<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()	+ path + "/";
	request.setCharacterEncoding("UTF-8");
	response.setContentType("text/html;charset=UTF-8");
%>
<jsp:include page="changePwd.jsp" flush="true"/>
<script type="text/javascript">
	var ctx="<%=path%>"; 
</script> 
<link rel="stylesheet" href="<%=path%>/css/glsmcx.css" type="text/css" />
<link rel="stylesheet" href="<%=path%>/css/upload.css" type="text/css" >
<script type="text/javascript" src="<%=path%>/js/controllers/freight.js"></script>
<div class="glsmcxWrap">
	<div class="container-fluid">
		<div class="panel panel-default">
			<div class="panel-heading">
				<h3 class="panel-title">运费模板管理</h3>
			</div>
			<input id="queryType" value="ht" style="display:none;"></input>
			<div class="panel-body clearfix">
				<form method="post" action="#" class="form-horizontal" role="form">
					 
					<ul class="clearfix listwork">
						<li data-target=".modal-add" data-toggle="modal" id="modal-add-freight-template-btn" class="add clearfix"><i></i>新增运费模板</li>
						<li data-target=".modal-add-freight-region" data-toggle="modal" id="modal-add-btn" class="add clearfix"><i></i>设置区域</li>
						<li class="del delete-batch clearfix" id="deleteMany"><i></i>删除</li>
					</ul>
					<div class="table-responsive">
						<table class="table table-bordered check left">
							<thead>
								<tr>
									<th> 
										<div class="checkbox">
									    	<label><input type="checkbox" class="all" /></label>
									    </div>
									</th>
									<th>序号</th>
									<th>运费模板名称</th>
									<th>区域别称</th> 
									<th>对应仓库</th>
									<th>包含的地区</th> 
									<th>首重重量(kg)</th>  
								    <th>首重运费(元)</th>
								    <th>续重价格(元/kg)</th>  
								    <th>创建时间</th> 
								    <th>备注</th>   
									<th>操作</th>
								</tr>
							</thead>
		
							<tbody id="dataBody">
								 
							</tbody>
						</table>
						
						<table class="table2excel table table-bordered hide">
						</table>
					</div>
				</form>
			</div>
		</div>
		<div class="clearfix pageBottom">	
			<div class="record-wrapper page" role="status" aria-live="polite">
				当前<span class="pageNo"> </span>/<span class="totalPages"> </span>页，每页
				<label class="inline">
					<select name="dataTable_length" 
						class="form-control input-sm setTableLength" aria-controls="dataTable">
						<option selected="selected" value="10">10</option>
						<option value="20">20</option>
						<option value="50">50</option>
						<option value="100">100</option>
						<option value="200">200</option>
						<option value="300">300</option>
						<option value="400">400</option>
						<option value="500">500</option>
						<option value="1000">1000</option>
				</select> 
				</label>&nbsp;条记录,共<span class="record-wrapper totalCount">0</span>条记录
			</div>
			<nav>
			<!-- 这里显示分页 -->
				<div id="Pagination" class="pagination"></div>
			</nav>
		</div>
			
	</div>
</div>


<!-- 添加运费模板s -->
<div class="modal fade modal-add" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
 	<div class="modal-dialog">
 		<div class="modal-content"> 
 			<div class="modal-header">
 				<button type="button" class="close" data-dismiss="modal">
 					<span aria-hidden="true">&times;</span><span class="sr-only">Close</span>
 				</button>
 				<h4 id="myModalLabel">新增运费模板</h4>
 			</div>
 			<div class="modal-body">
 				<form class="form-horizontal" novalidate="novalidate" id="addFreightTemplateForm">

 				<div class="form-group">
 					<div class="col-lg-61">
 						<label class="col-sm-41 control-label">模板名称：</label>
 						<div class="col-sm-81">
 							<input type="text" name="templateName" class="form-control input-sm" placeholder="模板名称：重庆仓运费模板">
 						</div>
 					</div> 
 				</div>  
 				
 				<div class="form-group">
 					<div class="col-lg-61">
						<label class="col-sm-41 control-label">首重重量：</label>
						<div class="col-sm-81">
							<!-- <input type="text" name="firstHeavy" class="form-control input-sm" placeholder="首重重量：kg（毛重）"> -->
							<select name="firstHeavy"> 
								<option value="0.5">500克</option>
								<option value="1">1公斤</option>
								<option value="1.2">1.2公斤</option>
								<option value="2">2公斤</option>
								<option value="5">5公斤</option>
								<option value="10">10公斤</option>
								<option value="20">20公斤</option>
								<option value="50">50公斤</option>
							</select>
						</div>
					</div> 
					
					<div class="col-lg-61">
						<label class="col-sm-41 control-label">首重运费：</label>
						<div class="col-sm-81">
							<input type="text" name="firstHeavyFreight" class="form-control input-sm" placeholder="首重运费：元">
						</div>
					</div> 
 				</div>  
 				
 				<div class="form-group">
 					<div class="col-lg-61">
						<label class="col-sm-41 control-label">续重重量：</label>
						<div class="col-sm-81">
							<!-- <input type="text" name="firstHeavy" class="form-control input-sm" placeholder="首重重量：kg（毛重）"> -->
							<select name="otherHeavy"> 
								<option value="0.5">500克</option>
								<option value="1">1公斤</option>
								<option value="1.2">1.2公斤</option>
								<option value="2">2公斤</option>
								<option value="5">5公斤</option>
								<option value="10">10公斤</option>
								<option value="20">20公斤</option>
								<option value="50">50公斤</option>
							</select>
						</div>
					</div> 
					
					<div class="col-lg-61">
						<label class="col-sm-41 control-label">续重运费：</label>
						<div class="col-sm-81">
							<input type="text" name="otherHeavyFreight" class="form-control input-sm" placeholder="续重运费：元">
						</div>
					</div> 
 				</div>
 				
 			</form> 
 			</div>
 			<div class="modal-footer">
 				<span  class="errorMsg red"></span> 
 				<button type="button" class="btn btn-primary" id="btn_add_FreightTemplate">保存</button>
 				<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
 			</div>	 
 		</div>		
 				
 	</div>
 			
</div>
<!-- 添加运费模板e -->


<!-- 修改运费模板s -->
<div class="modal fade modal-update-freight-template" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
 	<div class="modal-dialog">
 		<div class="modal-content"> 
 			<div class="modal-header">
 				<button type="button" class="close" data-dismiss="modal">
 					<span aria-hidden="true">&times;</span><span class="sr-only">Close</span>
 				</button>
 				<h4 id="myModalLabel">修改运费模板</h4>
 			</div>
 			<div class="modal-body">
 				<form class="form-horizontal" novalidate="novalidate" id="updateFreightTemplateForm">
					<input type="hidden" name="id" />
 				<div class="form-group">
 					<div class="col-lg-61">
 						<label class="col-sm-41 control-label">模板名称：</label>
 						<div class="col-sm-81">
 							<input type="text" name="templateName" class="form-control input-sm" placeholder="模板名称：重庆仓运费模板">
 						</div>
 					</div> 
 				</div>  
 				
 				<div class="form-group">
 					<div class="col-lg-61">
						<label class="col-sm-41 control-label">首重重量：</label>
						<div class="col-sm-81">
							<!-- <input type="text" name="firstHeavy" class="form-control input-sm" placeholder="首重重量：kg（毛重）"> -->
							<select name="firstHeavy"> 
								<option value="0.5">500克</option>
								<option value="1">1公斤</option>
								<option value="1.2">1.2公斤</option>
								<option value="2">2公斤</option>
								<option value="5">5公斤</option>
								<option value="10">10公斤</option>
								<option value="20">20公斤</option>
								<option value="50">50公斤</option>
							</select>
						</div>
					</div> 
					
					<div class="col-lg-61">
						<label class="col-sm-41 control-label">首重运费：</label>
						<div class="col-sm-81">
							<input type="text" name="firstHeavyFreight" class="form-control input-sm" placeholder="首重运费：元">
						</div>
					</div> 
 				</div>  
 				
 				<div class="form-group">
 					<div class="col-lg-61">
						<label class="col-sm-41 control-label">续重重量：</label>
						<div class="col-sm-81">
							<!-- <input type="text" name="firstHeavy" class="form-control input-sm" placeholder="首重重量：kg（毛重）"> -->
							<select name="otherHeavy"> 
								<option value="0.5">500克</option>
								<option value="1">1公斤</option>
								<option value="1.2">1.2公斤</option>
								<option value="2">2公斤</option>
								<option value="5">5公斤</option>
								<option value="10">10公斤</option>
								<option value="20">20公斤</option>
								<option value="50">50公斤</option>
							</select>
						</div>
					</div> 
					
					<div class="col-lg-61">
						<label class="col-sm-41 control-label">续重运费：</label>
						<div class="col-sm-81">
							<input type="text" name="otherHeavyFreight" class="form-control input-sm" placeholder="续重运费：元">
						</div>
					</div> 
 				</div>
 				
 			</form> 
 			</div>
 			<div class="modal-footer">
 				<span  class="errorMsg red"></span> 
 				<button type="button" class="btn btn-primary" id="btn_update_FreightTemplate">保存</button>
 				<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
 			</div>	 
 		</div>		
 				
 	</div>
 			
</div>
<!-- 修改运费模板e -->

	
<!-- 修改发货运费模板s -->
<div class="modal fade modal-add-freight-region" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
	<div class="modal-dialog">
		<div class="modal-content"> 
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal">
					<span aria-hidden="true">&times;</span><span class="sr-only">Close</span>
				</button>
				<h4 id="myModalLabel">设置运费模板区域范围</h4>
			</div>
			<div class="modal-body">
				<form class="form-horizontal" novalidate="novalidate" id="addForm"> 
				<input type="hidden" name="freightType" />
				<input type="hidden" name="id" />
				
				<div class="form-group">
					<div>
						<label class="col-sm-41 control-label"><b style="color: red">运费模板：</b></label><small>（如为空，请先新建运费模板）</small>
						<div class="col-sm-81">
							<select name="freightTemplateId"> 
							
							</select>
						</div>
					</div> 
				</div>
				
				<div class="form-group">
					<div class="col-lg-61">
						<label class="col-sm-41 control-label">区域别称：</label>
						<div class="col-sm-81">
							<input type="text" name="freightName" class="form-control input-sm" placeholder="区域别称：一般地区/偏远地区">
						</div>
					</div> 
					
					<div class="col-lg-61">
						<label class="col-sm-41 control-label">首重重量：</label>
						<div class="col-sm-81">
							<!-- <input type="text" name="firstHeavy" class="form-control input-sm" placeholder="首重重量：kg（毛重）"> -->
							<select name="firstHeavy"> 
								<option value="0.5">500克</option>
								<option value="1">1公斤</option>
								<option value="1.2">1.2公斤</option>
								<option value="2">2公斤</option>
								<option value="5">5公斤</option>
								<option value="10">10公斤</option>
								<option value="20">20公斤</option>
								<option value="50">50公斤</option>
							</select>
						</div>
					</div> 
					
					<div class="col-lg-61">
						<label class="col-sm-41 control-label">首重运费：</label>
						<div class="col-sm-81">
							<input type="text" name="firstHeavyFreight" class="form-control input-sm" placeholder="首重运费：元">
						</div>
					</div> 
				</div>
				 
				<div class="form-group"> 
					<div class="col-lg-61">
						<label class="col-sm-41 control-label">续重价格：</label>
						<div class="col-sm-81">
							<input type="text" name="otherHeavyFreight" class="form-control input-sm" placeholder="续重价格，元/kg（毛重）">
						</div>
					</div>  
					
					<div class="col-lg-61">
						<label class="col-sm-41 control-label">对应仓库：</label>
						<div class="col-sm-81">
							<select name="warehouseId"> 
							
							</select>
						</div>
					</div>
					
					<div class="col-lg-61">
						<label class="col-sm-41 control-label">备注：</label>
						<div class="col-sm-81">
							<input type="text" name="remark" class="form-control input-sm" placeholder="备注">
						</div>
					</div> 
				</div>
				 
				 
				<input type="hidden" name="regionVals" />
				<div class="form-group">
					<div class="col-lg-61">
						<label class="col-sm-41 control-label">地区选择：</label> 
					</div> 
				</div>
				
				
				<div class="glsmcxWrap">
	<div class="container-fluid">
		<div class="panel panel-default">
			<div class="panel-heading" style="height:35px" >
				<h3 class="panel-title"> </h3>
				<ul> 
					<li class="all">全部全选</li>
					<li class="nothing">全部全否</li>
					<li class="checknow">全选当前页</li>
					<li class="nothingnow">全否当前页</li> 
				</ul>
			</div>
			<input id="queryType" value="ht" style="display:none;"></input>
			
			<!-- 后台权限模块列表 -->
			<ul id="myTab" class="nav nav-tabs">
				
			</ul>
			
			<!-- 权限模块详情 -->
			<div id="myTabContent" class="tab-content">
				
			</div>
		</div>
	</div>
	<script>
	$(function () {
		$('#myTab li:eq(1) a').tab('show');
	});
	$('.panel-heading li').on('click',function(){
		$(this).siblings().css({'border':'none','color':'#428bca'})
		$(this).css({'border-left':'1px solid #ccc','border-right':'1px solid #ccc','color':'#333333'})
		
	})
	</script>
</div>			
			</form> 
			</div>
			<div class="modal-footer">
				<span  class="errorMsg red"></span> 
				<button type="button" class="btn btn-primary" id="btn_add">保存</button>
				<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
			</div>	 
		</div>				
	</div>	
</div>
<!-- 修改发货运费模板e -->
